var Tip = {
    show: function (_content, _time, _title) {
        var defaultTime = 1800;
        _time = "undefined" == typeof(_time) ? defaultTime : (_time ? defaultTime : _time);
        _content = "undefined" == typeof(_content) ? "" : _content;
        _title = "undefined" == typeof(_title) ? "系统提示您" : _title;
        var msgStr = "<div id=\"tip_msg\">";
        msgStr += "<div id=\"tip_title\">";
        msgStr += _title;
        msgStr += "<a id=\"tip_close\" href=\"javascript:void(0);\">X</a>";
        msgStr += "</div>";
        msgStr += "<div id=\"tip_info\">";
        msgStr += _content;
        msgStr += "</div>";
        msgStr += "</div>";
        $(msgStr).appendTo("body");
        $("#tip_close").live("click", function () {
            $("#tip_msg").remove();
        });
        $(window).bind("scroll resize",
            function () {
                Tip.setCenter(100);
            });
        $("#tip_msg").show();
        this.setCenter(100);
        if (_time) {
            setTimeout(function () {
                $("#tip_msg").remove();
            }, _time);
        }
    },
    hide: function () {
        $("#tip_msg").remove();
    },
    setCenter: function (_time) {
        var obj = $("#tip_msg");
        var left = ($(window).width() - obj.outerWidth()) / 2;
        var top = ($(window)
            .height() - obj.outerHeight()) / 2;
        top = (document.documentElement.scrollTop ? document.documentElement.scrollTop
            : document.body.scrollTop)
            + (top > 0 ? top : 0);
        obj.css({
            left: left
        }).animate({
                top: top
            }, {
                duration: _time,
                queue: false
            });
    }
};